home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / revtex / prabib.sty < prev    next >
Text File  |  1992-09-13  |  5KB  |  193 lines

  1. %%% ======================================================================
  2. %%%  @LaTeX-style-file{
  3. %%%     filename        = "prabib.sty",
  4. %%%     version         = "3.0",
  5. %%%     date            = "September 14, 1992",
  6. %%%     ISO-date        = "1992.09.14",
  7. %%%     time            = "15:41:54.18 EDT",
  8. %%%     author          = "American Physical Society",
  9. %%%     contact         = "Christopher B. Hamlin",
  10. %%%     address         = "APS Publications Liaison Office
  11. %%%                        500 Sunnyside Blvd.
  12. %%%                        Woodbury, NY 11797",
  13. %%%     telephone       = "(516) 576-2390",
  14. %%%     FAX             = "(516) 349-7817",
  15. %%%     email           = "mis@aps.org (Internet)",
  16. %%%     supported       = "yes",
  17. %%%     archived        = "pinet.aip.org/pub/revtex,
  18. %%%                        Niord.SHSU.edu:[FILESERV.REVTEX]",
  19. %%%     keywords        = "REVTeX, version 3.0, normal citations style,
  20. %%%                        American Physical Society",
  21. %%%     codetable       = "ISO/ASCII",
  22. %%%     checksum        = "56595 192 432 5349",
  23. %%%     docstring       = "This is the internally called style for
  24. %%%                        normal-style citations for the American
  25. %%%                        Physical Society under REVTeX 3.0
  26. %%%                        (release of November 10, 1992).
  27. %%%
  28. %%%                        The checksum field above contains a CRC-16
  29. %%%                        checksum as the first value, followed by the
  30. %%%                        equivalent of the standard UNIX wc (word
  31. %%%                        count) utility output of lines, words, and
  32. %%%                        characters.  This is produced by Robert
  33. %%%                        Solovay's checksum utility."
  34. %%% }
  35. %%% ======================================================================
  36. % ****** Start of file prabib.sty ******
  37. %
  38. %
  39. %   This file is part of the APS files in the REVTeX 3.0 distribution.
  40. %   Version 3.0 of REVTeX, November 10, 1992.
  41. %
  42. %   Copyright (c) 1992 The American Physical Society.
  43. %
  44. %   See the REVTeX 3.0 README file for restrictions and more information.
  45. %
  46.  
  47. \typeout{Filename: prabib.sty, v3.0 <9/14/92>}
  48.  
  49. \def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
  50. {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}
  51.  
  52. \newdimen\WidestRefLabelThusFar
  53.  
  54. \global\WidestRefLabelThusFar\z@
  55.  
  56. \def\bibcite#1#2{\global\@namedef{b@#1}{#2}\@SetMaxRefLabel{#1}}
  57.  
  58. \def\@SetMaxRefLabel#1{%
  59. {%
  60. \if\@ExpandsToRefNumber{#1}%
  61. \setbox0\hbox{\ifpreprintsty\@normalsize\else\small\fi
  62. \rm[\csname b@#1\endcsname]}%
  63. \else %
  64. \setbox0\hbox{\ifpreprintsty\@normalsize\else\small\fi
  65. $\scriptstyle\m@th{\csname b@#1\endcsname}$}%
  66. \fi
  67. \ifdim\wd0>\WidestRefLabelThusFar
  68. \global\WidestRefLabelThusFar=\wd0
  69. \fi
  70. }%
  71. }
  72.  
  73. \def\@ExpandsToRefNumber #1{%
  74. TT\fi %
  75. \@ifundefined{b@#1}%
  76. {\@tempcntb=1
  77. }%
  78. {\edef\@tempb{\csname b@#1\endcsname}%
  79. \def\@tempa{\@temptokena=\bgroup}%
  80. \if0A { \else  \fi %
  81. \afterassignment\@tempa
  82. \@tempcntb=0\@tempb}%
  83. }%
  84. \ifnum\@tempcntb>0 %
  85. }%
  86.  
  87. \def\cite{\@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
  88. \let\CITE\cite
  89. \let\onlinecite\cite
  90.  
  91. \def\@citex[#1]#2{%
  92. \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  93. \leavevmode\unskip\ \@cite{\@collapse{#2}}{#1}}
  94.  
  95. \def\@bylinecite{%
  96. \@ifnextchar[{\@tempswatrue\@CITEX}{\@tempswafalse\@CITEX[]}%
  97. }
  98.  
  99. \def\@CITEX[#1]#2{%
  100. \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  101. \leavevmode\unskip$^{\scriptstyle\@CITE{\@collapse{#2}}{#1}}$}
  102.  
  103. \def\@cite#1#2{[{#1\if@tempswa , #2\fi}]} %
  104. \def\@CITE#1#2{{#1\if@tempswa , #2\fi}} %
  105.  
  106. \def\@lbibitem[#1]#2{\item[\@BIBLABEL{#1}]\if@filesw
  107. {\def\protect##1{\string ##1\space}\immediate
  108. \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
  109.  
  110. \def\@biblabel#1{{[#1]}} %
  111. \def\@BIBLABEL#1{$^{#1}\m@th$} %
  112.  
  113. \def\references{%
  114. \ifpreprintsty
  115. \newpage
  116. \hbox to\hsize{\hss\large \refname\hss}%
  117. \else
  118. \vskip24pt
  119. \hrule width\hsize\relax
  120. \vskip 1.6cm
  121. \fi
  122. \list{\@biblabel{\arabic{enumiv}}}%
  123. {\labelwidth\WidestRefLabelThusFar  \labelsep4pt %
  124. \leftmargin\labelwidth %
  125. \advance\leftmargin\labelsep %
  126. \ifdim\baselinestretch pt>1 pt %
  127. \parsep  4pt\relax %
  128. \else %
  129. \parsep  0pt\relax %
  130. \fi
  131. \itemsep\parsep %
  132. \usecounter{enumiv}%
  133. \let\p@enumiv\@empty
  134. \def\theenumiv{\arabic{enumiv}}%
  135. }%
  136. \let\newblock\relax %
  137. \sloppy\clubpenalty4000\widowpenalty4000
  138. \sfcode`\.=1000\relax
  139. \ifpreprintsty\else\small\fi
  140. }
  141.  
  142. \def\endreferences{%
  143. \def\@noitemerr{\@warning{Empty `thebibliography' environment}}%
  144. \endlist     \let\@SetMaxRefLabel\@gobble
  145. }
  146.  
  147. \def\thebibliography#1{\references}
  148.  
  149. \def\endthebibliography{\endreferences}
  150.  
  151. \def\@collapse#1{%
  152. {%
  153. \let\@temp\relax
  154. \@tempcntb\@MM
  155. \def\@citea{}%
  156. \@for \@citeb:=#1\do{%
  157. \@ifundefined{b@\@citeb}%
  158. {\@temp\@citea{\bf ?}%
  159. \@tempcntb\@MM\let\@temp\relax
  160. \@warning{Citation `\@citeb ' on page \thepage\space undefined}%
  161. }%
  162. {\@tempcnta\@tempcntb \advance\@tempcnta\@ne
  163. \edef\MyTemp{\csname b@\@citeb\endcsname}%
  164. \def\@tempa{\@temptokena=\bgroup}%
  165. \if0A{\fi%
  166. \afterassignment\@tempa %
  167. \@tempcntb=0\MyTemp\relax}%
  168. \ifnum\@tempcntb=0\relax%
  169. \@tempcntb=\@MM
  170. \@citea\MyTemp
  171. \let\@temp = \relax
  172. \else %
  173. \edef\@tempd{\number\@tempcntb}%
  174. \ifnum\@tempcnta=\@tempcntb %
  175. \ifx\@temp\relax %
  176. \edef\@temp{\@citea\@tempd}%
  177. \else
  178. \edef\@temp{\hbox{--}\@tempd}%
  179. \fi
  180. \else %
  181. \@temp\@citea\@tempd
  182. \let\@temp\relax
  183. \fi
  184. \fi
  185. }%
  186. \def\@citea{,}%
  187. }%
  188. \@temp %
  189. }%
  190. }%
  191. %
  192. % ****** End of file prabib.sty ******
  193.